/**
 * Created by fuji0229 on 2016/9/16.
 */
module.exports = function(gulp,common){
    var plugin = common.plugin,
        config = common.config,
        wiPlugin = common.wiPlugin;
    gulp.task('build','生成完整的资源包',plugin.sequence(
        'cleanDest',// 清空目标目录
        'lib',
        'wiFrame',
        'cleanTemp',// 清空临时目录
        'wiFrameCopy'// 生成单独的 wiFrame 资源
    ));
    gulp.task('lib','拷贝lib资源包',function(){
        return gulp
            .src(config['lib']+'**',{
                base:'.'
            })
            .pipe(gulp.dest(config['dest']));
    });
    gulp.task('wiFrameCopy','从 dest 中获取单独的 wiFrame 资源',function(){
        return gulp
            .src(config['dest']+'wiFrame/**')
            .pipe(gulp.dest('./wiFrame'));
    });
};